The statements in this section merely provide background information related to the present disclosure and may not constitute prior art.
At present, image capturing devices with auto focus function are widely used in digital still cameras, video cameras, mobile phones, machine vision systems, microscopes, telescopes and many other systems. Auto focus enables image capturing devices to acquire high quality images of an object in an automatic and repeatable manner.
In general auto focus methods can be categorized into two classes: 1) active auto focus method; and 2) passive auto focus method.
Active auto focus systems use separate displacement sensors to measure the distance between the object and the lens, adjusting the lens position based on the measured distance. These displacement sensors can be ultrasonic, laser or infrared sensors.
Compared to passive auto focus systems, active auto focus systems have the following drawbacks. 1) In some biological applications, none of the above sensors can be used, since ultrasonic waves and light ray may damage live cells. 2) Auto focus systems using laser or infrared sensors typically do not work when trying to focus on highly curved surface, since light beam emitted from sensors is reflected off by the surface and does not return back to sensors. 3) Auto focus systems using infrared sensors and ultrasonic sensors will typically not focus through windows, since sound waves and infrared light are reflected by the glass before reaching to an object. 4) Active auto focus systems are typically bulky due to the use of distance measurement sensors. This makes them not suitable for applications with limited space.
Unlike active auto focus systems, passive auto focus systems do not use separate distance measurement sensors to determine the distance between an object and a focusing lens. Instead, they determine the distance by performing analysis of images captured by image capturing devices. Typically passive auto focus can be achieved by phase detection or contrast measurement.
Phase detection auto focus relies on a focus-detection optical system and a plurality of position sensing detectors to determine whether the incoming image is in-focus. The focus-detection optical system and the position sensing detectors are separate from the image capturing optics and the image capturing CCD or CMOS sensor. The focus-detection optics splits incoming light into two separate beams. Based on where these two beams strike it, the position sensing detectors calculate how far out of focus the incoming image is and whether focus is in front of or behind the focal plane. The output of the position sensing detectors is feedback to a controller and the controller activates an auto focus motor to move focus lens to the best focus position. The phase detection calculation is performed in milliseconds and auto focus can be done repeatedly at a very fast rate. This gives an image capturing devices the ability to continually change focus or automatically track a fast-moving object.
The main drawbacks of phase-detection auto focus systems are that they are bulky and more costly to produce since they use additional optics and position sensing detectors.
Contrast measurement auto focus systems perform focus adjustment without using any additional hardware. It uses the same sensor, the image capturing CCD or CMOS sensor, for both auto focus and image capture. Contrast measurement auto focus systems analyze the incoming image and calculate its contrast value. A contrast measurement auto focus system typically starts with the lens at the infinity position and moves step by step to the close end of the focusing range, gauging the contrast to see if it increases or decreases. As the contrast increases, the system knows it is getting closer to an accurate focusing point. At the best focusing point, the contrast reaches a peak. After passing this point, the contrast begins to decrease. Once the system has identified the peak of contrast, the lens is locked down at the corresponding position.
Compared to active auto focus systems and phase detection auto focus systems, contrast measurement auto focus systems have the following advantages. 1) No additional hardware is used. Auto focus can be implemented by software only. This makes the overall image capturing systems less complicated and compact, suitable for applications with limited space. 2) Contrast measurement auto focus systems are more cost effective and flexible, making them a better choice for industrial inspection and measuring systems based on machine vision technology. 3) Contrast measurement auto focus systems are suitable for biological and medical applications, since they do not damage live samples. 4) Focusing performance is not affected by object material. For active auto focus systems, when the object to be imaged is transparent, laser or optical sensors may not function correctly since light passes through the object.
The performance of a contrast measurement auto focus system is largely dependent on the accuracy and reliability of image's contrast measurement. In return, the accuracy and reliability of image's contrast measurement is largely dependent on the image processing algorithms and methods used to evaluate the contrast value. So far, several algorithms have been implemented, including gradient magnitude measurement, Robert edge detector, Sobel edge detector, Laplacian filter, infinite impulse response (IIR) filter.
However, the accuracy and reliability of an image's contrast value measured by the above algorithms can be greatly degraded by the variations of illumination uniformity of incoming images. For example, during focusing on a highly reflective curved surface, the intensity of light rays received by the image capturing CCD or CMOS sensor changes with the distance between the focusing lens and the surface. This results in that some captured images have more bright spots than others. These bright spots will have considerable impact to image's contrast value. As a consequence, image's contrast value may reach the peak while the focusing lens is not at the focus position. This leads to an auto focus system malfunction.